import { IsNotEmpty, IsNumber, IsOptional, MaxLength } from 'class-validator'
import i18n from '@/i18n'
import { ApiProperty } from '@nestjs/swagger'

export class MetaTemplateUpdateDto {
  @ApiProperty({ description: 'ID' })
  @IsNotEmpty()
  @IsNumber()
  id: number

  @ApiProperty({ description: i18n.t('dto.meta-template-update.531168-0') })
  @MaxLength(64)
  @IsNotEmpty()
  label: string

  @ApiProperty({ description: i18n.t('dto.meta-template-update.531168-1') })
  @IsNotEmpty()
  content: string

  @ApiProperty({ description: i18n.t('dto.meta-template-update.531168-2') })
  @IsNotEmpty()
  @MaxLength(64)
  groupLabel: string

  @ApiProperty({ description: i18n.t('dto.meta-template-update.531168-3') })
  @IsOptional()
  thumbnail?: string

  @ApiProperty({ description: i18n.t('dto.meta-template-update.531168-4') })
  @IsNumber()
  @IsOptional()
  sortNo?: number
}
